from rest_framework.serializers import ModelSerializer
from goods.models import Carousel, Goods, Category, GoodsImg, GoodsCollect


# 轮播图序列化器
class CarouselSer(ModelSerializer):
    class Meta:
        model = Carousel
        fields = "__all__"


# 商品序列化器
class GoodsSer(ModelSerializer):
    class Meta:
        model = Goods
        fields = "__all__"


# 类别序列化器
class CategorySer(ModelSerializer):
    class Meta:
        model = Category
        fields = "__all__"


# 商品图片序列化器
class GoodImgSer(ModelSerializer):
    class Meta:
        model = GoodsImg
        fields = "__all__"


# 收藏商品序列化器
class GoodsCollectSer(ModelSerializer):
    class Meta:
        model = GoodsCollect
        fields = "__all__"
